! function(e) {
    function t(n, i, r) { clearTimeout(a);
        var o = n.find("li").length;
        n.find("ul").css(r ? { "-webkit-transform": "translateX(-" + 100 / o * (i - 1) + "%)" } : { "-webkit-transition": "-webkit-transform " + 100 * s.movespeed + "ms ease-out", "-webkit-transform": "translateX(-" + 100 / o * (i - 1) + "%)" }), setTimeout(function() { i == o ? i = 2 : 1 === i && (i = o - 1), s.scurpage = i, n.find("ul").css({ "-webkit-transition": "none" }), n.find("ul").css({ "-webkit-transform": "translateX(-" + 100 / o * (i - 1) + "%)" }), n.find(".ourslider_nav_n").removeClass("ourslider_nav_n_checked"), e(n.find(".ourslider_nav_n")[i - 2]).addClass("ourslider_nav_n_checked") }, 100 * s.movespeed), s.touchbacks(i), s.autoplay && (a = setTimeout(function() { t(n, ++s.scurpage, !1) }, s.playspeed)) }

    function n(t) {
        if (t.append('<div class="ourslider_nav" align="center" style="position: absolute; bottom: 20px; right: 20px;"></div>'), t.find("li").length > 1)
            for (var n = 0; n < t.find("li").length - 2; n++) e(".ourslider_nav").append('<span class="ourslider_nav_n" style="padding: 6px; font-size: 0px; border-radius: 50%;  border:solid 1px #808080; margin-left: 8px;"></span>') }
    var s = { scurpage: 1, autoplay: !0, playspeed: 3e3, movespeed: 5, callbacks: function() {}, touchbacks: function() {} },
        a = setTimeout(function() {}, 1e4);
    e.extend(e.fn, { ourSlider: function(i) { s = e.extend(s, i);
            var r = e(this);
            s.playspeed < 1e3 && (s.playspeed = 1e3), (s.movespeed > 20 || s.movespeed < 1 || isNaN(s.movespeed)) && (s.movespeed = 5), r.css({ position: "relative", width: "100%", overflow: "hidden" });
            var o = r.find("li").length;
            r.find("ul").css({ "-webkit-transform": "translateX(0%)", padding: "0px", margin: "0px", width: "" + o + "00%" }), r.find("img:first").attr("src", r.find("img").eq(o - 2).attr("src")), r.find("li").css({ display: "block", "line-height": "100px", padding: "0px", margin: "0px", "list-style": "none", "float": "left", width: "" + 100 / o + "%" }), n(r), t(r, s.scurpage, !0);
            var d = {},
                p = {};
            r[0].addEventListener("touchstart", function(n) {
                function i(t) {
                    var n = t.touches[0];
                    if (p = { x: n.pageX - d.x, y: n.pageY - d.y }, !(Math.abs(p.x) > Math.abs(p.y))) return !1;
                    t.preventDefault();
                    var a = parseInt(-(e(r[0]).width() * (s.scurpage - 1))) + parseInt(p.x);
                    0 >= a && a >= c && e(r[0]).find("ul").css({ "-webkit-transform": "translateX(" + a + "px)" }) }

                function u() { p.x > 50 ? 1 == s.scurpage ? t(r, s.scurpage, !1) : t(r, s.scurpage - 1, !1) : p.x < -50 ? s.scurpage == o ? t(r, s.scurpage, !1) : t(r, parseInt(s.scurpage + 1), !1) : t(r, s.scurpage, !1), r[0].removeEventListener("touchmove", i, !1), r[0].removeEventListener("touchend", u, !1) }
                var l = n.touches[0];
                d = { x: l.pageX, y: l.pageY }, p = {};
                var c = parseInt(-(e(r[0]).width() * (o - 1)));
                r.find("ul").css({ "-webkit-transition": "none" }), clearTimeout(a), r[0].addEventListener("touchmove", i, !1), r[0].addEventListener("touchend", u, !1) }, !1) } }) }($);
